<#include "macro_.ftl">
package ${packageCode}.${moduleMapperKey}.service;

import java.util.List;
import java.util.Map;

import com.fand.cache.support.CacheEvictSupport;
import com.fand.dto.PaginationDto;
<#list poMapperList as poMapper>
<#if poMapper.markService>
import ${packageCode}.${moduleMapperKey}.dto.${poMapper.code}Dto;
</#if>
</#list>

/**
 * ${businessMapper.name!businessCode}服务
 *
 * @author ${author!'yaoHT'}
 */
public interface ${businessCode}Service extends CacheEvictSupport {
	String BEAN_ID = "${packageCode}.${moduleMapperKey}.service.${businessCode}Service";

	String CACHE_NAME = BEAN_ID + "Cache";
<#if businessCode == (moduleMapperKey?cap_first)>
<#list moduleMapper.businessMap?values as localBusiness>
<#if (localBusiness.code!) != (moduleMapperKey?cap_first)>

	/**
	 * 获取：${localBusiness.name!localBusiness.code}服务
	 * 
	 * @return ${localBusiness.name!localBusiness.code}服务
	 */
	${localBusiness.code!}Service get${localBusiness.code!}Service();
</#if>
</#list>
<#else>
</#if>
<#list poMapperList as poMapper>
<#if poMapper.markService>
	/**
	 * 保存:${poMapper.remarks!poMapper.code}
	 * 
	 * @param save${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	${poMapper.code}Dto save${poMapper.code}ByIdOrCodeFor${poMapper.code}(${poMapper.code}Dto save${poMapper.code});

	/**
	 * 保存:${poMapper.remarks!poMapper.code}
	 * 
	 * @param save${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	${poMapper.code}Dto save${poMapper.code}By2For${poMapper.code}(${poMapper.code}Dto save${poMapper.code});

	/**
	 * 删除:${poMapper.remarks!poMapper.code}
	 * 
	 * @param delete${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${poMapper.code}By1(${poMapper.code}Dto delete${poMapper.code});

	/**
	 * 删除:${poMapper.remarks!poMapper.code}
	 * 
	 * @param delete${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int delete${poMapper.code}ByIds(${poMapper.code}Dto delete${poMapper.code});

	/**
	 * 设置:${poMapper.remarks!poMapper.code}
	 * 
	 * @param set${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int set${poMapper.code}By1(${poMapper.code}Dto set${poMapper.code});

	/**
	 * 设置:${poMapper.remarks!poMapper.code}
	 * 
	 * @param set${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return 影响行数
	 */
	int set${poMapper.code}By2(${poMapper.code}Dto set${poMapper.code});

	/**
	 * 读取:${poMapper.remarks!poMapper.code}
	 * 
	 * @param read${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	Integer read${poMapper.code}ByCodeNqIdForInteger(${poMapper.code}Dto read${poMapper.code});

	/**
	 * 读取:${poMapper.remarks!poMapper.code}
	 * 
	 * @param read${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	Integer read${poMapper.code}By2ForInteger(${poMapper.code}Dto read${poMapper.code});

	/**
	 * 读取:${poMapper.remarks!poMapper.code}
	 * 
	 * @param readList${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	List<Integer> readList${poMapper.code}By1(${poMapper.code}Dto read${poMapper.code});

	/**
	 * 读取:${poMapper.remarks!poMapper.code}
	 * 
	 * @param readList${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	List<Integer> readList${poMapper.code}By2(${poMapper.code}Dto read${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param get${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	${poMapper.code}Dto get${poMapper.code}By1(${poMapper.code}Dto get${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param get${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象
	 */
	${poMapper.code}Dto get${poMapper.code}ById(${poMapper.code}Dto get${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param find${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	List<${poMapper.code}Dto> find${poMapper.code}By1(${poMapper.code}Dto find${poMapper.code});

	/**
	 * 查询:${poMapper.remarks!poMapper.code}
	 * 
	 * @param find${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}对象集合
	 */
	List<${poMapper.code}Dto> find${poMapper.code}By2(${poMapper.code}Dto find${poMapper.code});
	
	/**
	 * 分页:${poMapper.remarks!poMapper.code}
	 * 
	 * @param pagination${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}分页对象
	 */
	PaginationDto<${poMapper.code}Dto> pagination${poMapper.code}By1For${poMapper.code}List(${poMapper.code}Dto pagination${poMapper.code});
			
	/**
	 * 分页
	 * 
	 * @param pagination${poMapper.code}
	 *            ${poMapper.remarks!poMapper.code}对象
	 * 
	 * @return ${poMapper.remarks!poMapper.code}分页对象
	 */
	PaginationDto<Map<String, Object>> pagination${poMapper.code}By1ForMapList(${poMapper.code}Dto pagination${poMapper.code});
</#if>
</#list>
}